package com.ikangtai.shecare.curve.mpchart;


import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.formatter.AxisValueFormatter;

public class BBTYAxisLeftValueFormatter implements AxisValueFormatter {
    @Override
    public String getFormattedValue(float value, AxisBase axis) {

        //
//        if(value == BBTLineChart.MIN_YAXIS_BBT)
//            return "≤" + value;
//
//        if(value == BBTLineChart.MAX_YAXIS_BBT)
//            return "≥" + value;

        int delta = (int) (value * 10) % 10;

        if (delta != 0){
            if((int) (value * 10) % 2 == 0)
                return "." + delta;
            else
                return "";
        }
        else
            return "" + (int) value;
    }

    @Override
    public int getDecimalDigits() {
        return 0;
    }
}
